package com.haipumi.biz.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haipumi.beans.haipumi_reply;
import com.haipumi.biz.IBackTaskReplyBiz;
import com.haipumi.dao.IBackTaskReplyDao;
import com.haipumi.mapper.TaskReplyMapper;

@Service("backTaskReplyBiz")
public class BackTaskReplyBizImpl implements IBackTaskReplyBiz {
	
	
	@Autowired
	TaskReplyMapper taskReplyMapper;
	
	@Override
	public List<haipumi_reply> findAllTaskReply(int start,int end,String sort,String order) {
		List<haipumi_reply>replylist=null;
		Map<String ,Object> map=new HashMap<String ,Object> ();
		map.put("start", start);
		map.put("end", end);
		map.put("sort", sort);
		map.put("order", order);
		replylist=taskReplyMapper.findAllTaskReply(map);
		return replylist;
	}

	@Override
	public int countTaskReply(int start,int end,String sort,String order) {
		int r=0;
		Map<String ,Object> map=new HashMap<String ,Object> ();
		map.put("start", start);
		map.put("end", end);
		map.put("sort", sort);
		map.put("order", order);
		r=taskReplyMapper.countTaskReply(map);
		return r;
	}

	@Override
	public haipumi_reply editReply(haipumi_reply reply) {
		haipumi_reply backreply=null;
		backreply=taskReplyMapper.editReply(reply);
		
		return backreply;
	}

	@Override
	public haipumi_reply findreply(String rid) {
		haipumi_reply reply=taskReplyMapper.findreply(rid);
		return reply;
	}

}
